package com.brush.pig.domain.req.sow;

import cn.hutool.core.util.StrUtil;
import com.brush.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@ApiModel(value = "SowQueryInformationReq", description = "母猪查询信息请求参数")
public class SowQueryInformationReq extends PageAbstructReq {


    /**
     * 猪只类型
     */
    @ApiModelProperty(value = "猪只类型")
    private String type="MOTHER";

    /**
     * 所在厂区ID
     */
    @ApiModelProperty(value = "所在厂区ID")
    private Long FactoryID;


    /**
     * 排序
     *
     * @return
     */
    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
